VirtualTimeSchedulerBase class¶
Defined in
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.dll
Full name: System.Reactive.Concurrency.VirtualTimeSchedulerBase<T1, T2>
Modifiers: public abstract
Summary¶
Base class for virtual time schedulers.
Applies to
netstandard2.0
Class hierarchy
classDiagram
class VirtualTimeSchedulerBase~T1,T2~
class IScheduler {
<>
}
IScheduler <|.. VirtualTimeSchedulerBase~T1,T2~
class IServiceProvider {
<>
}
IServiceProvider <|.. VirtualTimeSchedulerBase~T1,T2~
class IStopwatchProvider {
<>
}
IStopwatchProvider <|.. VirtualTimeSchedulerBase~T1,T2~
Implements: IScheduler, IServiceProvider, IStopwatchProvider
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Creates a new virtual time scheduler with the default value of TAbsolute as the initial clock value. |
Properties¶
| Name | Summary |
|---|---|
| IsEnabled | Gets whether the scheduler is enabled to run work. |
| Comparer | Gets the comparer used to compare absolute time values. |
| Clock | Gets the scheduler's absolute time clock value. |
| Now | Gets the scheduler's notion of current time. |
Methods¶
| Name | Summary |
|---|---|
| Add | Adds a relative time value to an absolute time value. |
| ToDateTimeOffset | Converts the absolute time value to a DateTimeOffset value. |
| ToRelative | Converts the TimeSpan value to a relative time value. |
| ScheduleAbsolute | Schedules an action to be executed at dueTime. |
| ScheduleRelative | Schedules an action to be executed at dueTime. |
| Schedule | Schedules an action to be executed. |
| Start | Starts the virtual time scheduler. |
| Stop | Stops the virtual time scheduler. |
| AdvanceTo | Advances the scheduler's clock to the specified time, running all work till that point. |
| AdvanceBy | Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan. |
| Sleep | Advances the scheduler's clock by the specified relative time. |
| GetNext | Gets the next scheduled item to be executed. |
| GetService | Discovers scheduler services by interface type. The base class implementation supports only the IStopwatchProvider service. To influence service discovery - such as adding ... |
| StartStopwatch | Starts a new stopwatch object. |